<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST">
    <div class="form-group">
        <label for="name" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="name" name="row[name]" data-rule="required;name" value="{$row.name}" />
        </div>
    </div>

    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label for="c-thumbs" class="control-label col-xs-12 col-sm-2">{:__('Thumbs')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-thumbs" data-rule="" class="form-control" size="50" name="row[thumbs]" type="text" value="{$row.thumbs}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-thumbs" class="btn btn-danger faupload" data-input-id="c-thumbs" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-thumbs"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-thumbs" class="btn btn-primary fachoose" data-input-id="c-thumbs" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-thumbs"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-thumbs"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[flag]', $flaglist, $row.flag , ['class'=>'selectpicker', 'required'=>''])}
        </div>
    </div>

    <div class="form-group">
        <label for="stock" class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="number" class="form-control" id="stock" name="row[stock]" data-rule="required;stock" value="{$row.stock}" />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Typeid')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[typeid]', $Typedata, $row.typeid, ['class'=>'selectpicker', 'required'=>''])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unitid')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[unitid]', $Unitdata, $row.unitid, ['class'=>'selectpicker', 'required'=>''])}
        </div>
    </div>

    <div class="form-group">
        <label for="name" class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="price" name="row[price]" data-rule="required;price" value="{$row.price}" />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[status]', $statusList, $row.status, ['class'=>'selectpicker', 'required'=>''])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('RentStatus')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[rentstatus]', $rentSList, $row.rentstatus, ['class'=>'selectpicker', 'required'=>''])}
        </div>
    </div>

    <div class="form-group">
        <label for="name" class="control-label col-xs-12 col-sm-2">{:__('rent')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="rent" name="row[rent]" data-rule="required;rent" value="{$row.rent}"/>
        </div>
    </div>

    <div class="form-group">
        <label for="name" class="control-label col-xs-12 col-sm-2">{:__('RentPrice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="rent_price" name="row[rent_price]" data-rule="required;rent_price" value="{$row.rent_price}" />
        </div>
    </div>

    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>